/**
 * Created by zhaojing on 2017/11/15.
 */

import Vue from 'vue';
import tpl from './tpl.html';
import FdSwipe from '../../../../grsc-base/component/Slide/vue-slide.vue'
import commonService from '../../../common/commonService';
import lib from '../../../common/lib';

export default Vue.extend({
    name:'Swiper',
    template: tpl,
    components: {
        rdSwipe:FdSwipe
    },

    data() {
        return {
            lib: lib,
            swipe: {
                activeIndex: 0,
                autoplay: 5000
            },
            contacts: [{
                text: 'Page 1'
            }, {
                text: 'Page 2'
            }, {
                text: 'Page 3'
            }, {
                text: 'Page 4'
            }]
        }
    },
    created() {
        // commonService.basic().done((rep) => {
        //     if (rep.code === window.CODE.NO_LOGIN.CODE) {
        //         this.hasLogin = false;
        //     } else if (rep.code === window.CODE.NO_LOGIN.CODE) {
        //         this.hasLogin = true;
        //     }
        // }).fail((rep) => {
        //     window.error(rep.msg);
        // }).always(rep => {
        //
        // });
    },
    mounted(){

    },
    methods: {
        // turnTo (index) {
        //     setTimeout(()=>{
        //         console.log(11111);
        //
        //         this.$children.map(swipe => {
        //             if (swipe.turnTo) {
        //                 swipe.turnTo(index)
        //             }
        //         })
        //     },0)
        // }

        turnToRegister(){
            window.location.href = "./register.html";
        },

        goFinance() {
            window.location.href = "./smc_finance.html";
        },

        goVca(){
            window.location.href = './vca_usc.html'
        }

    },
    watch: {

    }
});